package com.android.powerbankpad.network;

import com.lzy.okgo.model.Progress;
import com.lzy.okserver.download.DownloadListener;
import com.ws.universal.tools.utils.LogcatUtils;

import java.io.File;

public class LogDownloadListener extends DownloadListener {
    public LogDownloadListener() {
        super("LogDownloadListener");
    }

    @Override
    public void onStart(Progress progress) {
        LogcatUtils.e("downloadImg onStart: " + progress);
    }

    @Override
    public void onProgress(Progress progress) {
        LogcatUtils.e("downloadImg onProgress: " + progress);
    }

    @Override
    public void onError(Progress progress) {
        LogcatUtils.e("downloadImg onError: " + progress);
        progress.exception.printStackTrace();
    }

    @Override
    public void onFinish(File file, Progress progress) {
        LogcatUtils.e("downloadImg onFinish: " + progress);
    }

    @Override
    public void onRemove(Progress progress) {
        LogcatUtils.e("downloadImg onRemove: " + progress);
    }
}
